package com.example.jdimust.value;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * Author: MaZongyang
 * Date: 2021/5/19/0019 21:34
 * Description:
 */
public class ValueBean {

    @SerializedName("flag")
    private Boolean flag;
    @SerializedName("message")
    private String message;
    @SerializedName("result")
    private List<ResultDTO> result;

    public Boolean getFlag() {
        return flag;
    }

    public void setFlag(Boolean flag) {
        this.flag = flag;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<ResultDTO> getResult() {
        return result;
    }

    public void setResult(List<ResultDTO> result) {
        this.result = result;
    }

    public static class ResultDTO {

        @Override
        public String toString() {
            return "ResultDTO{" +
                    "id=" + id +
                    ", valueKey='" + valueKey + '\'' +
                    ", valueUid=" + valueUid +
                    ", valueAid=" + valueAid +
                    ", versions=" + versions +
                    '}';
        }

        @SerializedName("id")
        private Integer id;
        @SerializedName("valueKey")
        private String valueKey;

//        @Override
//        public String toString() {
//            return "ResultDTO{" +
//                    "id=" + id +
//                    ", valueKey='" + valueKey + '\'' +
//                    ", valueUid=" + valueUid +
//                    ", valueAid=" + valueAid +
//                    ", versions=" + versions +
//                    '}';
//        }

        @SerializedName("valueUid")
        private Integer valueUid;
        @SerializedName("valueAid")
        private Integer valueAid;
        @SerializedName("versions")
        private List<VersionsDTO> versions;

        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public String getValueKey() {
            return valueKey;
        }

        public void setValueKey(String valueKey) {
            this.valueKey = valueKey;
        }

        public Integer getValueUid() {
            return valueUid;
        }

        public void setValueUid(Integer valueUid) {
            this.valueUid = valueUid;
        }

        public Integer getValueAid() {
            return valueAid;
        }

        public void setValueAid(Integer valueAid) {
            this.valueAid = valueAid;
        }

        public List<VersionsDTO> getVersions() {
            return versions;
        }

        public void setVersions(List<VersionsDTO> versions) {
            this.versions = versions;
        }

        public static class VersionsDTO {
            @SerializedName("id")
            private Integer id;
            @SerializedName("value")
            private String value;
            @SerializedName("version")
            private Integer version;
            @SerializedName("type")
            private String type;
            @SerializedName("createTime")
            private Long createTime;
            @SerializedName("blockHeight")
            private Integer blockHeight;
            @SerializedName("vid")
            private Integer vid;
            @SerializedName("state")
            private String state;

            @Override
            public String toString() {
                return "{" +
                        "id=" + id +
                        ", value='" + value + '\'' +
                        ", version=" + version +
                        ", type='" + type + '\'' +
                        ", createTime=" + createTime +
                        ", blockHeight=" + blockHeight +
                        ", vid=" + vid +
                        ", state='" + state + '\'' +
                        '}';
            }

            public Integer getId() {
                return id;
            }

            public void setId(Integer id) {
                this.id = id;
            }

            public String getValue() {
                return value;
            }

            public void setValue(String value) {
                this.value = value;
            }

            public Integer getVersion() {
                return version;
            }

            public void setVersion(Integer version) {
                this.version = version;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public Long getCreateTime() {
                return createTime;
            }

            public void setCreateTime(Long createTime) {
                this.createTime = createTime;
            }

            public Integer getBlockHeight() {
                return blockHeight;
            }

            public void setBlockHeight(Integer blockHeight) {
                this.blockHeight = blockHeight;
            }

            public Integer getVid() {
                return vid;
            }

            public void setVid(Integer vid) {
                this.vid = vid;
            }

            public String getState() {
                return state;
            }

            public void setState(String state) {
                this.state = state;
            }
        }
    }
}
